/** 
* All Rights Reserved , Copyright (C) 2021 , 青岛鼎信通讯股份有限公司
* 
* FileManageServiceAuto
* 文件管理
* 
* 修改纪录
* 2021-03-13 版本：1.0 donghang 创建。
* @version 版本：1.0
* @author 作者：donghang
* 创建日期：2021-03-13
*/

package com.topscomm.center.service.impl.auto;

import javax.annotation.Resource;
import com.topscomm.basic.IBasicDao;
import com.topscomm.tap.common.DatacodeCache;
import java.util.Map;
import com.topscomm.center.*;
import com.topscomm.center.pojo.FileManageEntity;
import com.topscomm.center.dao.IFileManageDao;


public class FileManageServiceAuto extends CenterService<FileManageEntity,IFileManageDao> {
	
	/**
	 * @author: donghang
	 * @date: 2021-03-13
	 * @param mapRow
	 * @description:设置字段显示值
	 * @modify:
	 */
	@Override
	public void setDispFields(Map<String, Object> mapRow, DatacodeCache datacodeCache) {
		String temp;
		if (mapRow.get("orgcode") != null) {
			temp = mapRow.get("orgcode").toString();
			mapRow.put("disporgcode", datacodeCache.getValueDynamic("CboOrg", temp, "code", "name"));
		}
		if (mapRow.get("deptcode") != null) {
			temp = mapRow.get("deptcode").toString();
			mapRow.put("dispdeptcode", datacodeCache.getValueDynamic("CboDeptFull", temp, "code", "name"));
		}
		if (mapRow.get("uploadstate") != null) {
			temp = mapRow.get("uploadstate").toString();
			mapRow.put("dispuploadstate", datacodeCache.getValueDynamic("FileUploadState", temp, "code", "name"));
		}
		if (mapRow.get("enabled") != null) {
			temp = mapRow.get("enabled").toString();
			mapRow.put("dispenabled", datacodeCache.getValueDynamic("CboYesNo", temp, "code", "name"));
		}
	}

	@Override
	@Resource(name = "fileManageDao")
	public void setDao(IBasicDao<FileManageEntity> dao) {		
		super.setDao(dao);
	}
}
